#ifndef P_MATERIAL_SYSTEM_H
#define P_MATERIAL_SYSTEM_H

#include "ECS/System/PSystem.h"

#include "Graphics/PiccoloVKCommon.h"
#include "Graphics/PiccoloGraphicsContext.h"

namespace Piccolo
{
    class PiccoloVKRenderPass;
    class PiccoloRenderTarget;
    class PiccoloApplication;
    class PiccoloVKDevice;
    class PScene;

    class PMaterialSystem : public PSystem
    {
    public:
        virtual void OnInit(PiccoloVKRenderPass* renderPass) = 0;
        virtual void OnRender(VkCommandBuffer cmdBuffer, PiccoloRenderTarget* renderTarget) = 0;
        virtual void OnDestroy() = 0;

    protected:
        PiccoloApplication* GetApplication() const;
        PiccoloVKDevice* GetDevice() const;
        PScene* GetScene() const;

        const glm::mat4 GetProjMatrix(PiccoloRenderTarget *renderTarget) const;
        const glm::mat4 GetViewMatrix(PiccoloRenderTarget *renderTarget) const;
    };
}

#endif